<?php



class TodaysDateAndTimeSwe
{
	public function getTodaysDate()
	{
			// kalla på dagens datum. 
			$todaysDate = getdate();
			$time = $todaysDate['hours']. ":" . $todaysDate['minutes']. ":" . $todaysDate['seconds'];
			$year = $todaysDate['year'];	 
			$month = $todaysDate['mon']; 	 // 1-12.
			$mday = $todaysDate['mday'];	 // 1-31.
			$wday = $todaysDate['wday'];	 // 0 sunday -6 saturday. 
			
			
			// switch satser för dag och månad.
			switch($wday)
			{
				case 0:
					$wday = "Söndag";
					break;
					
				case 1:
					$wday = "Måndag";
					break;
					
				case 2:
					$wday = "Tisdag";
					break;
					
				case 3:
					$wday = "Onsdag";	
					break;
					
				case 4:
					$wday = "Torsdag";
					break;	
					
				case 5:
					$wday = "Fredag";
					break;
					
				case 6:
					$wday = "Lördag";
					break;		
			}
			
			
			
			switch($month)
			{
				case 1:
					$month = "Januari";
					break;
					
				case 2:
					$month = "Februari";
					break;
					
				case 3:
					$month = "Mars";
					break;
					
				case 4:
					$month = "April";	
					break;
					
				case 5:
					$month = "Maj";
					break;	
					
				case 6:
					$month = "Juni";
					break;
					
				case 7:
					$month = "Juli";
					break;		
					
				case 8:
					$month = "Augusti";
					break;
					
				case 9:
					$month = "September";	
					break;
					
				case 10:
					$month = "Oktober";
					break;	
					
				case 11:
					$month = "November";
					break;
					
				case 12:
					$month = "December";
					break;		
			}

			
			$todaysDateAndTime =  $wday . ", den " . $mday . " " . $month. " år " . $year . ". Klockan är [" . $time . "].";
			return $todaysDateAndTime;
	}

}
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	